<template>
  <template v-for="m in menuInfo" :key="m.id">
    <a-menu-item v-if="!m.children.length" :key="m.name">{{m.meta.title}}</a-menu-item>
    <a-sub-menu v-else>
      <template #title>{{m.meta.title}}</template>
      <SubMenu :menuInfo="m.children"/>
    </a-sub-menu>
  </template>
</template>
<script lang="ts" setup>
import type {Menu} from "@/router";

const {menuInfo} = defineProps<{ menuInfo: Menu[] }>()
</script>